Strict
#Rem
Header: AGFX Fonts container. 
#End
Import agfx

#Rem
summary: TFontContainer 
#End
Class TFontContainer

	Private
	Field _fnt:StringMap<TFont>

	Public
	
	#Rem
		summary: Constructor
	#End
	Method New()
		Self._fnt = New StringMap<TFont>
	End Method

	#Rem
		summary: Load font
		name:String - filename (no extension)
	#End
	Method Load:Void(name:String)
		Local f:TFont = New TFont		
		f.Create(name)
		Self._fnt.Insert(name,f)
	End Method

	#Rem
		summary: Find font by name
	#End	
	Method Find:TFont(name:String)
		
		If Self._fnt.Contains(name) Then
			Return Self._fnt.Get(name)
		EndIf

		Return null

	End Method

End Class